package com.hotel.dto;

import javax.validation.constraints.*;
import java.math.BigDecimal;

/**
 * 房间数据传输对象
 */
public class RoomDTO {
    
    @NotBlank(message = "房间号不能为空")
    @Size(max = 20, message = "房间号长度不能超过20个字符")
    private String roomNumber;
    
    @NotNull(message = "房间类型不能为空")
    private Long roomTypeId;
    
    @NotNull(message = "楼层不能为空")
    @Min(value = 1, message = "楼层必须大于0")
    @Max(value = 50, message = "楼层不能超过50")
    private Integer floor;
    
    @NotBlank(message = "房间状态不能为空")
    @Pattern(regexp = "^(available|occupied|cleaning|maintenance|out_of_order)$", 
             message = "房间状态只能是：available(可用)、occupied(已入住)、cleaning(清洁中)、maintenance(维护中)、out_of_order(停用)")
    private String status;
    
    @DecimalMin(value = "0.00", message = "房间价格不能小于0")
    @DecimalMax(value = "99999.99", message = "房间价格不能超过99999.99")
    private BigDecimal price;
    
    @Size(max = 500, message = "房间描述长度不能超过500个字符")
    private String description;
    
    @Size(max = 1000, message = "房间设施长度不能超过1000个字符")
    private String facilities;
    
    @Size(max = 500, message = "备注长度不能超过500个字符")
    private String remarks;
    
    // 构造函数
    public RoomDTO() {}
    
    // Getter和Setter方法
    public String getRoomNumber() {
        return roomNumber;
    }
    
    public void setRoomNumber(String roomNumber) {
        this.roomNumber = roomNumber;
    }
    
    public Long getRoomTypeId() {
        return roomTypeId;
    }
    
    public void setRoomTypeId(Long roomTypeId) {
        this.roomTypeId = roomTypeId;
    }
    
    public Integer getFloor() {
        return floor;
    }
    
    public void setFloor(Integer floor) {
        this.floor = floor;
    }
    
    public String getStatus() {
        return status;
    }
    
    public void setStatus(String status) {
        this.status = status;
    }
    
    public BigDecimal getPrice() {
        return price;
    }
    
    public void setPrice(BigDecimal price) {
        this.price = price;
    }
    
    public String getDescription() {
        return description;
    }
    
    public void setDescription(String description) {
        this.description = description;
    }
    
    public String getFacilities() {
        return facilities;
    }
    
    public void setFacilities(String facilities) {
        this.facilities = facilities;
    }
    
    public String getRemarks() {
        return remarks;
    }
    
    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }
    
    @Override
    public String toString() {
        return "RoomDTO{" +
                "roomNumber='" + roomNumber + '\'' +
                ", roomTypeId=" + roomTypeId +
                ", floor=" + floor +
                ", status='" + status + '\'' +
                ", price=" + price +
                ", description='" + description + '\'' +
                ", facilities='" + facilities + '\'' +
                ", remarks='" + remarks + '\'' +
                '}';
    }
}